﻿using NewsPortal.Domain;
using System.Data.Entity.ModelConfiguration;

namespace NewsPortal.DataAccess.POCO.Config
{
    public class RowConfiguration: EntityTypeConfiguration<Row>
    {
        public RowConfiguration()
        {
            this.HasKey(r => r.Id);

            this.HasMany(r => r.Columns).WithRequired(c => c.Row).HasForeignKey(c => c.RowId);
        }
    }
}
